import request from '@/utils/request'

export function getDepartments(){
    return request({
        url:'/company/department',
        method:'get'
    })
}

export function AddDepartments(data){
    return request({
        url:'/company/department',
        method:'post',
        data
    })
}

export function getDepartmentsDetail(id){
    return request({
        url:`/company/department/${id}`,
        method:'get',
    })
}


export function updateDepartmentsDetail(data){
    return request({
        url:`/company/department/${data.id}`,
        method:'put',
        data
    })
}


export function DelDepartmentsDetail(id){
    return request({
        url:`/company/department/${id}`,
        method:'delete',
    })
}